home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat4 / elf.z / elf
Encoding:
Text File  |  2002-10-03  |  4.5 KB  |  98 lines

  1. ELF(4)                                               Last changed: 10-21-98
  2.  
  3.  
  4. NNAAMMEE
  5.      eellff - Executable and Linking Format (ELF) files
  6.  
  7. SSYYNNOOPPSSIISS
  8.      ##iinncclluuddee <<eellff..hh>>
  9.  
  10. IIMMPPLLEEMMEENNTTAATTIIOONN
  11.      IRIX systems
  12.  
  13. DDEESSCCRRIIPPTTIIOONN
  14.      The aa..oouutt file name is the default ELF-format output file name from
  15.      the lldd(1) link editor.  The link editor will make an aa..oouutt executable
  16.      if there were no errors and no unresolved external references.
  17.  
  18.      Programs that manipulate ELF files may use the library described in
  19.      the eellff(3E) man page.  An overview of the file format follows.  For
  20.      more complete information, see the references in the SEE ALSO section.
  21.  
  22.      LLiinnkkiinngg VViieeww                       EExxeeccuuttiioonn VViieeww
  23.  
  24.      ELF header                         ELF header
  25.  
  26.      Program header table (optional)    Program header table
  27.  
  28.      Section 1                          Segment 1
  29.  
  30.      ...                                ...
  31.  
  32.      Section _n                          Segment _n
  33.  
  34.      Section header table               Section header table (optional)
  35.  
  36.      An ELF header resides at the beginning and holds a ``road map'' that
  37.      describes the file's organization.  Sections hold the bulk of object
  38.      file information for the linking view:  instructions, data, symbol
  39.      table, relocation information, and so on.  Segments hold the object
  40.      file information for the program execution view.  A segment may
  41.      contain one or more sections.
  42.  
  43.      A program header table, if present, tells the system how to create a
  44.      process image.  Files used to build a process image (execute a
  45.      program) must have a program header table; relocatable files do not
  46.      need one.  A section header table contains information describing the
  47.      file's sections.  Every section has an entry in the table; each entry
  48.      provides information such as the section name, the section size, etc.
  49.      Files used during linking must have a section header table; other
  50.      object files may or may not have one.  SGI executables and DSO files
  51.      will be created with section header tables, so their absence in an
  52.      object file, while not prohibited, may disable various tools.
  53.  
  54.      Although the overview of the file format indicates that the program
  55.      header table immediately follows the ELF header, and the section
  56.      header table follows the sections, actual files may differ.  Sections
  57.      and segments have no specified order.  Only the ELF header has a fixed
  58.      position in the file.
  59.  
  60.      When an aa..oouutt file is loaded into memory for execution, three kinds of
  61.      logical segments are set up:  the text segment, the data segment
  62.      (initialized data followed by uninitialized, the latter actually being
  63.      initialized to all 0s), and a stack.  A program can have multiple text
  64.      and data segments but only one stack segment.  The text segments are
  65.      not writable by the program; if other processes are executing the same
  66.      aa..oouutt file, the processes will share the same text segments.
  67.  
  68.      The first data segment generally starts at the next maximal page
  69.      boundary past the last text address.  If the system supports more than
  70.      one page size, the ``maximal page'' is the largest supported size.
  71.      When the process image is created, the part of the file holding the
  72.      end of text and the beginning of data may appear twice.  The
  73.      duplicated chunk of text that appears at the beginning of data is
  74.      never executed; it is duplicated so that the operating system may
  75.      bring in pieces of the file in multiples of the actual page size
  76.      without having to realign the beginning of the data section to a page
  77.      boundary.  Therefore, the first data address is the sum of the next
  78.      maximal page boundary past the end of text plus the remainder of the
  79.      last text address divided by the maximal page size.  If the last text
  80.      address is a multiple of the maximal page size, no duplication is
  81.      necessary.  The stack is extended automatically as required.  The last
  82.      data segment is extended as requested by the bbrrkk(2) system call.
  83.  
  84. NNOOTTEESS
  85.      ELF is the executable and object file format used on IRIX 5 and later
  86.      systems.
  87.  
  88. SSEEEE AALLSSOO
  89.      aass(1), cccc(1), lldd(1)
  90.  
  91.      bbrrkk(2)
  92.  
  93.      aa..oouutt(4)
  94.  
  95.      _I_R_I_X _S_y_s_t_e_m _P_r_o_g_r_a_m_m_e_r'_s _G_u_i_d_e
  96.  
  97.      This man page is available only online.
  98.